package com.yunji.hushuang;

/**
 * 懒汉式单例
 *
 * @author hushuang
 * @since 2019/9/29
 */
public class LazySingleton {

    private static LazySingleton instance;

    private LazySingleton() {
    }

    public static LazySingleton getInstance() {
        if (instance == null) {
            instance = new LazySingleton();
        }
        return instance;
    }
}
